<template>
	<view class="content">
		<text class="title">{{count}}</text>

		<view class="">
			<button @tap="doIncrement">+</button>
			<button @tap="doDecrement">-</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			};
		},
		computed: {
			count() {
				return this.$store.state.count;
			}
		},
		methods: {
			doIncrement() {
				this.$store.commit('increment');
			},
			doDecrement() {
				this.$store.commit('decrement');
			}
		},
	}
</script>

<style>
	.content {
		flex: 1;
		justify-content: center;
		align-items: center;
	}

	.title {
		font-size: 36upx;
		color: #8f8f94;
	}
</style>
